<html xmlns:wicket="http://wicket.apache.org">

    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <wicket:extend>
        <script>
            
           
           
            window.onload = function() {
                
            };
                 
            $(document).ready(function(){                
            });
        
            $(function(){
			$.superbox.settings = {
				closeTxt: "Close",
				loadTxt: "Loading...",
				nextTxt: "Next",
				prevTxt: "Previous"
			};
			$.superbox();
		});
            $(function(){ 
                
                //determine editing
                var isEdditing = $("#isEditing")[0].getAttribute("value");
                if (isEdditing === "1")
                    showEditTool();
            });
            
            $(function(){ 
                
                $("a.photoLink").click(function(){
                    var cislo = Math.floor((Math.random()*50)+10);
                    var odkaz = "http://wallpapers.nikee.net/foto/divky/tn/0"+cislo+".jpg";
                    $("a.photoLink").attr('href',odkaz);
                    
                });
            });
            
            function showEditTool() { $("#formular").show("slow"); $("#addItem").hide(); };
            function hideEditTool() { $("#formular").hide("slow"); $("#addItem").show(); };
        </script>
            <div class="post">
            <h2><wicket:message key="headding">Stewards</wicket:message></h2>
            <p wicket:id="info">Prihlaste se</p>
            <a wicket:id="showForm" id="addItem" onclick="showEditTool()"><img class="ico" src="Images/add.png"/></a>
            
            <div wicket:id="feedback">[[ feedback ]]</div>
            <div id="formular" style="display: none">
                <form wicket:id="stewForm" class="editform">
                    <fieldset>
                        <legend><h4><span wicket:id="heading">Form Name</span></h4></legend>
                        <input type="text" id="isEditing" wicket:id="isEdditing" hidden="true">
                        <table>                        
                            <tr><td><wicket:message key="form.firstname">First Name: </wicket:message></td><td><input type="text" wicket:id="firstnameForm" size="40"/></td></tr>
                            <tr><td><wicket:message key="form.lastname">Last Name: </wicket:message></td><td><input type="text" wicket:id="lastnameForm" size="40"/></td></tr>
                            <tr><td><wicket:message key="form.personalID">PersonalID: </wicket:message></td><td><input type="text" wicket:id="personalIDForm" value="0" size="4"/></td></tr>
                            <tr><td></td><td><input type="submit" wicket:id="submitButton" wicket:message="value:form.submit"/>
                                    <input type="submit" wicket:id="cancelButton" wicket:message="value:form.cancel">
                                </td></tr>
                        </table>
                    </fieldset>
                </form>
            </div>
            <p wicket:id="error"></p>
            <table class="datatable">
                <tr wicket:id="header">
                    <th><wicket:message key="view.id">ID</wicket:message></th>
                <th><wicket:message key="view.firstname">First Name</wicket:message></th>
                <th><wicket:message key="view.lastname">Last Name</wicket:message></th>
                <th><wicket:message key="view.personalID">Personal ID</wicket:message></th>
                </tr>
                <tr wicket:id="repeating">
                    <td><span wicket:id="contactID">[contactID]</span> </td>
                    <td><span wicket:id="firstname">[firstname]</span></td>
                    <td><span wicket:id="lastname">[lastname]</span></td>
                    <td><span wicket:id="personalID">[perosnalID]</span></td>
                    <td><a class="photoLink" rel='superbox[image]'>Photo</a></td>
                    <td><a wicket:id="pensLink"><img class="ico" src="Images/pero.png"/></a>
                        <a wicket:id="crossLink"><img class="ico" src="Images/delete.png"/></a>
                    </td>

                </tr>
            </table> 
        </div>

    </wicket:extend>
</body>
</html>
